﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using System.Data.OracleClient;

namespace BookingSystemDAL
{
    public class AdminDAL
    {
        public AdminDAL() { }

        //判断管理员账号是否存在
        public DataSet AdminloginUser(string AdministratorName, string Pwd)
        {
            string sql = "select *from adminTable where AdministratorName=:AdministratorName and Pwd=:Pwd";
            OracleParameter[] oracleparameter = 
            {
                new OracleParameter(":AdministratorName",AdministratorName),
                new OracleParameter(":Pwd",Pwd)
            };
            try
            {
                return OracleHelper.ExecuteDataSet(sql, oracleparameter);
            }
            catch (System.Exception ex)
            {
                throw (ex);
            }
        }
    }
}
